﻿using System;
using System.Collections.Generic;
using System.Text;

namespace XMK.Framework.Model.Cond
{
    [Serializable]
    /// <summary>
    /// 接口调用基本信息
    /// </summary>
    public class WsCond
    {
        /// <summary>
        /// 接口调用编号
        /// </summary>
        public string wsId { get; set; }
        /// <summary>
        /// 登录员工工号
        /// </summary>
        public string userId { get; set; }
        /// <summary>
        /// 供应商ID【bst】
        /// </summary>
        public string supplierId { get; set; }
        /// <summary>
        /// 调用服务器IP地址
        /// </summary>
        public string ipAddr { get; set; }
        /// <summary>
        /// 为日志记录使用的GUID
        /// </summary>
        public string logId { get; set; }
        /// <summary>
        /// 调用方服务器调用时间【yyyy-MM-dd HH24:mi:ss】
        /// </summary>
        public string callDatetime { get; set; }
        /// <summary>
        /// 当前页
        /// </summary>
        public int curPage { get; set; }
        /// <summary>
        /// 每页数
        /// </summary>
        public int pageSize { get; set; }
        /// <summary>
        /// 排序列（数字列均能排序)
        /// </summary>
        public string sortField { get; set; }
        /// <summary>
        /// 排序列排序(0:倒序，1：升序)
        /// </summary>
        public int sortRule { get; set; }
        /// <summary>
        /// 是否需要返回记录数(0：总记录数和数据都要；1：只需要总记录数；2：只需要数据列表)
        /// </summary>
        public int isNeedCount { get; set; }
        /// <summary>
        /// 用于记录日志的字符
        /// </summary>
        /// <returns></returns>
        public string ToLogString()
        {
            return "[GUID:" + this.logId + "][接口:" + this.wsId + "]";
        }
    }
}
